import Vue from 'vue'
import Router from 'vue-router'

// 引入tab的四个组件
import home from 'components/home';
import vip from "components/vip";
import cart from "components/cart";
import search from "components/search";
import news from "components/home/news";
import pictures from "components/home/pictures";
import vedio from "components/home/vedio";
import relation from "components/home/relation";
import goods from "components/home/goods";
import notes from "components/home/notes";

Vue.use(Router)

export default new Router({
  //通过export default 暴露出组件的路由
  routes: [
    { path: "/", component: home, redirect: "/home" },

    { path: "/home", component: home },
    { path: "/vip", component: vip },
    { path: "/cart", component: cart },
    { path: "/search", component: search },
    { path: "/news", component: news },
    { path: "/goods", component: goods },
    { path: "/pictures", component: pictures },
    { path: "/relation", component: relation },
    { path: "/vedio", component: vedio },
    { path: "/notes", component: notes }
  ],
  created() {
    console.log($route);
  },
  linkActiveClass: "myActive",
});
